This application is based on application No. 11-148309 filed in Japan, the content of which is hereby incorporated by reference.
1. Field of the Invention
The present invention relates to a region extraction device, a region extraction method, and a recording medium on which a region extraction program is recorded. In particular, the invention relates to a region extraction device and a region extraction method for extracting from an image a region of a specific part such as face, hand, hair, lips and the like of a person, and relates to a recording medium on which a region extraction program for extracting such a region is recorded.
2. Description of the Related Art
Studies have heretofore been conducted to extract only the face region of a person included in an image. European Patent No. 756426 discloses an art of extracting a face area of a person included in an image. According to this art, a hue value is calculated from an input image signal, the number of pixels having the derived hue value is counted to determine the skin color of the person in the image, pixels having the determined hue value are extracted, and accordingly the face area of the person is extracted. More specifically, hue value H is calculated for each pixel by using equation (1) below from an input image signal. Pixels included in the image signal include three data, i.e., R (red), G (green) and B (blue).                     H        =                                            cos                              -                1                                      ⁡                          [                                                                    (                                          R                      -                      G                                        )                                    +                                      (                                          R                      -                      B                                        )                                                                    2                  ⁢                                                            (                                                                                                    (                                                          R                              -                              G                                                        )                                                    2                                                +                                                                              (                                                          R                              -                              B                                                        )                                                    ⁢                                                      (                                                          G                              -                              B                                                        )                                                                                              )                                                                                  ]                                ⁢                      xe2x80x83                    ⁢                      (                                          H                =                                                      2                    ⁢                    π                                    -                  H                                            ,                                                if                  ⁢                                      xe2x80x83                                    ⁢                  B                                 greater than                 G                                      )                                              (        1        )            
Then, the number of pixels having hue value H included in a predetermined range is counted. The ratio of the face area to the input image signal is considered, and accordingly the skin color of the person included in the image signal is determined. Based on the determined skin color, a range of the hue value is specified. Pixels having hue values which fall within the specified range of the hue value are extracted from the input image signal. The face area of the person is thus extracted from the input image signal.
According to the art disclosed in EP 756426, pixels having hue values in a predetermined range are extracted so as to extract from an image a specified area representing a face. Therefore, if the hues of the specified area are distributed over a certain range due to influences of shade and the like on the face, the specified area cannot be extracted accurately. Especially, the outline of the face is likely to be shaded which causes the outline not to be extracted. In this case, the outline of the face cannot be specified from the extracted image.
Although the range of the extracted hue values can be expanded until the range encompasses a range of hues distributed in the specified area in order to extract the specified area, a background area having hues similar to the hues of the face is also extracted disadvantageously.
The present invention is made to solve the problem above. One object of the invention is to provide a region extraction device and a region extraction method capable of accurately extracting a specific region in an image even if pixel values in the specific region to be extracted are scattered in a wide range, and a computer-readable recording medium on which a region extraction program for allowing a computer to extract a specific region is recorded.
In order to achieve the object above, according to one aspect of the invention, a region extraction device includes a segmentation unit to divide an input image into a plurality of regions, a calculation unit to determine a ratio of pixels of a predetermined value to all pixels of each of the plurality of regions, and an extraction unit to extract a region in which the ratio determined by the calculation unit exceeds a first value.
According to another aspect of the invention, a region extraction method includes the steps of dividing an input image into a plurality of regions, determining a ratio of pixels of a predetermined value to all pixels of each of the plurality of regions, and extracting a region in which the ratio determined in the determining step exceeds a first value.
According to still another aspect of the invention, a computer-readable recording medium has a region extraction program recorded thereon, the region extraction program allowing a computer to execute the steps of dividing an input image into a plurality of regions, determining a ratio of pixels of a predetermined value to all pixels of each of the plurality of regions, and extracting a region in which the ratio determined in the determining step exceeds a predetermined value.
According to this invention, it is possible to provide a device and a method capable of accurately extracting a specific region in an image even if pixel values in the specific region to be extracted are scattered in a wide range, and provide a computer-readable recording medium on which a region extraction program for allowing a computer to extract a specific region is recorded.